package sec5flowcontrol;

public class FlowControlSwitch {
	
	public static void main(String[] args) {
		check();
	}
	
	public static void check() {
		int cond = 20; //100
		final int a = 5;
		final int b = 10;
		
		switch(cond) {
			case a + b: System.out.println("10");;
			case 20:;
			case 30: System.out.println("20 or 30");
			default: System.out.println("Default");
		}
		
		System.out.println("---------------------------");
		
		switch(cond) {
			default: System.out.println("Default");
			case 10: System.out.println("10");;
			case 20: ; // continue
			case 30: System.out.println("20 or 30");
		}

		System.out.println("---------------------------");
		
		switch(cond) {
			case 10: System.out.println("10"); break;
			case 20:;
			case 30: System.out.println("20 or 30"); break;
			default: System.out.println("Default");
		}
	}

}
